home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
getdigit.arc
/
GETDIGIT.DOC
< prev
Wrap
Text File
|
1985-08-11
|
3KB
|
70 lines
This program accepts a prompt from the command line and accepts
a one digit response to that prompt. On exit, the DOS ERRORLEVEL
is set to the digit. Non-numeric keys are ignored and <Ctrl><Break>
will not exit.
This program requires DOS 2.0.
Usage:
GETDIGIT prompt
where "prompt" is the message to displayed to the user.
Example batch file usage:
echo off
:menu
cls
echo ---IBM PC Menu--
echo 1 - Run Wordstar
echo 2 - Run Dbase II
echo 3 - Exit to DOS
GETDIGIT Please enter an option number:
if errorlevel 4 goto menu
if errorlevel 3 goto end
if errorlevel 2 goto dbase
if errorlevel 1 goto wordstar
:if we get here nothing matched -- try again
goto menu
:wordstar
cls
echo We would run WORDSTAR here.
pause
goto menu
:dbase
cls
echo We would run DBASE here.
pause
goto menu
:end
cls
echo on
Copyright (C) 1983 Tony Alan Rhea
This program may be copied and distributed for personal use
but not for profit provided this notice is included. Author makes
no warranty, expressed or implied, as to the correct nature and
operation of this software.
You may make and distribute as many copies of this program as you wish
for your PERSONAL use only ( NOT for business purposes, please! ).
Feel free to modify, mutilate, or adulterate this program. If you come
up with an bug or improvement, please let me know by writing me at this
address:
Tony A. Rhea
1030 Ivy Lane
Cary, NC 27511
If you do modify it, please give me credit in the program. This helps
to preserve my ego and increase my fame (but, unfortunately, NOT my
financial status). Also, I would appreciate a copy of the modified
version, preferably on disk (I'll be happy to return your diskette).
If you like this program ( or HATE it ), please let me know. Drop me
a line at the address given above.
This program has been submitted for publication in PC-WORLD magazine.
Revision history:
rev 1.0 10/26/83 { original release }